<?php
	session_start();
	$timout = 60 * 60;
	$inactive = time() - $_SESSION['LAST_ACTIVE_TIME'];
	if ($inactive > $timout) {
		$_SESSION = array();
		session_destroy();
		header("Location: ../index.php");
	} else {
		$_SESSION['LAST_ACTIVE_TIME'] = time();
	}
?>